package a.h;

import a.i.ib;
import a.i.jb;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyVetoException;

class o
  extends d
{
  public static final String n = "JRadioButtonGroupEditor.alignment";
  public static final String o = "JRadioButtonGroupEditor.buttonFactory";
  public static final String p = "alignment";
  public static final String q = "factory";
  public static final d_ r = new d_(null);
  public static final d_ s = new d_(null);
  private vc t;
  private JRadioButton[] u;
  private JRadioButton v;
  private int w;
  private JPanel x;
  private d_ y;
  private b_ z;
  static Class A;
  
  public o(ec paramec, ob paramob)
  {
    super(paramec);
    if (i == 0)
    {
      if ((paramec instanceof w))
      {
        if (i != 0) {
          break label48;
        }
        a(paramec, paramob, ((w)paramec).b());
      }
    }
    else if (!ec.s) {
      return;
    }
    label48:
    a(paramec, paramob, null);
  }
  
  public o(ec paramec, ob paramob, Object[] paramArrayOfObject)
  {
    super(paramec);
    a(paramec, paramob, paramArrayOfObject);
  }
  
  private void a(ec paramec, ob paramob, Object[] paramArrayOfObject)
  {
    int k = ec.t;
    boolean bool = ec.s;
    Object localObject = paramec.c(n);
    if ((k != 0) || (localObject != null)) {
      if (k == 0)
      {
        if ((localObject instanceof d_))
        {
          this.y = ((d_)localObject);
          if (k != 0) {
            break label77;
          }
        }
      }
      else {
        if (!bool) {
          break label68;
        }
      }
    }
    this.y = s;
    label68:
    localObject = paramec.c(o);
    label77:
    if ((k != 0) || (localObject != null)) {
      if (k == 0)
      {
        if ((localObject instanceof b_))
        {
          this.z = ((b_)localObject);
          if (k != 0) {
            break label144;
          }
        }
      }
      else {
        if (!bool) {
          break label132;
        }
      }
    }
    this.z = new c_(paramob);
    label132:
    this.t = new vc(paramArrayOfObject);
    label144:
    this.u = ((k != 0) || (paramArrayOfObject != null) ? new JRadioButton[paramArrayOfObject.length] : new JRadioButton[0]);
    this.w = -1;
    ButtonGroup localButtonGroup = new ButtonGroup();
    this.v = new JRadioButton();
    this.v.setSelected(false);
    int i = 0;
    do
    {
      if (i >= this.u.length) {
        break;
      }
      int j = i;
      this.u[i] = this.z.a(paramArrayOfObject[i]);
      this.u[i].setSelected(false);
      if (k != 0) {
        break label331;
      }
      this.u[i].addActionListener(new ActionListener()
      {
        private final int val$index;
        
        public void actionPerformed(ActionEvent paramAnonymousActionEvent)
        {
          Object localObject = o.this.n();
          o.this.w = this.val$index;
          o.this.a(localObject, o.this.t.a(this.val$index));
        }
      });
      localButtonGroup.add(this.u[i]);
      i++;
      if (bool) {
        break label330;
      }
    } while (!bool);
    localButtonGroup.add(this.v);
    d(paramec.m());
    if (k == 0)
    {
      c(paramec.f());
      label330:
      label331:
      if (k == 0) {
        if (this.y == r)
        {
          b();
          if (k != 0) {
            break label372;
          }
          if (!bool) {
            break label363;
          }
        }
      }
      a();
      label363:
      label372:
      if ((k == 0) && (p())) {}
    }
    else
    {
      a(paramec.o());
    }
  }
  
  private void a()
  {
    int j = ec.t;
    boolean bool = ec.s;
    this.x = (this.y == r ? new JPanel(new GridLayout(1, this.u.length)) : new JPanel(new GridLayout(this.u.length, 1)));
    do
    {
      for (int i = 0; !bool; i++)
      {
        if (i >= this.u.length) {
          break;
        }
        this.x.add(this.u[i]);
      }
    } while (j != 0);
  }
  
  private void b()
  {
    int j = ec.t;
    boolean bool = ec.s;
    this.x = new JPanel(new GridBagLayout());
    int i = 0;
    do
    {
      if (i >= this.u.length) {
        break;
      }
      GridBagConstraints localGridBagConstraints = new GridBagConstraints();
      localGridBagConstraints.anchor = 17;
      if (j == 0)
      {
        if (i < this.u.length - 1)
        {
          localGridBagConstraints.fill = 0;
          localGridBagConstraints.weightx = 0.0D;
          localGridBagConstraints.insets = new Insets(0, 0, 0, 5);
          if (j != 0) {
            continue;
          }
          if (!bool) {}
        }
        else
        {
          localGridBagConstraints.fill = 2;
        }
      }
      else {
        localGridBagConstraints.weightx = 1.0D;
      }
      localGridBagConstraints.gridx = i;
      localGridBagConstraints.gridy = 0;
      this.x.add(this.u[i], localGridBagConstraints);
      i++;
    } while (!bool);
  }
  
  public Object n()
  {
    return this.t.a(this.w);
  }
  
  public void a(Object paramObject)
  {
    int j = ec.t;
    Object localObject = n();
    if ((j != 0) || (nb.a(localObject, paramObject)))
    {
      try
      {
        b(e, localObject, paramObject);
      }
      catch (PropertyVetoException localPropertyVetoException)
      {
        this.u[this.w].setSelected(true);
        return;
      }
      int i = this.t.a(paramObject);
      if (j == 0)
      {
        if (i < -1) {
          return;
        }
        this.w = i;
        this.u[i].setSelected(true);
      }
      a(localObject, this.t.a(i));
    }
  }
  
  public boolean o()
  {
    return this.v.isEnabled();
  }
  
  public void c(boolean paramBoolean)
  {
    int j = ec.t;
    boolean bool2 = ec.s;
    boolean bool1 = this.v.isEnabled();
    if ((j != 0) || (bool1 != paramBoolean))
    {
      int i = 0;
      if (i < this.u.length)
      {
        if (j != 0) {}
      }
      else
      {
        do
        {
          this.u[i].setEnabled(paramBoolean);
          i++;
          if (bool2) {
            break label88;
          }
          if (!bool2) {
            break;
          }
          this.x.setEnabled(paramBoolean);
        } while (j != 0);
        this.v.setEnabled(paramBoolean);
      }
      label88:
      if (j == 0) {}
      a(bool1, !bool1);
    }
  }
  
  public boolean p()
  {
    return this.v.isSelected();
  }
  
  public void d(boolean paramBoolean)
  {
    boolean bool = this.v.isSelected();
    if ((ec.t != 0) || (bool != paramBoolean))
    {
      if (paramBoolean) {
        this.v.setSelected(true);
      }
      b(bool, paramBoolean);
    }
  }
  
  public JComponent f()
  {
    return this.x;
  }
  
  static Class a(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
  
  static final class d_
  {
    private d_() {}
    
    d_(o.0 param0)
    {
      this();
    }
  }
  
  static abstract interface b_
  {
    public abstract JRadioButton a(Object paramObject);
  }
  
  class c_
    implements o.b_
  {
    private ob a;
    private jb b;
    private final String c;
    
    public c_(ob paramob)
    {
      this.a = paramob;
      this.b = ib.c();
      Object localObject = o.this.i.c(ec.c);
      this.c = ((localObject != null ? localObject.toString() + "." : "") + o.this.i.d() + ".VALUE.");
    }
    
    public JRadioButton a(Object paramObject)
    {
      int i = ec.t;
      boolean bool = ec.s;
      if (i == 0) {
        if (paramObject == ec.b)
        {
          if (i != 0) {
            break label34;
          }
          str = "";
          if (!bool) {
            break label145;
          }
        }
      }
      if (paramObject != null)
      {
        label34:
        if (i != 0) {
          break label93;
        }
        if (this.a != null)
        {
          if (i != 0) {
            break label93;
          }
          str = this.a.b(this.c + paramObject.toString());
          if (!bool) {
            break label145;
          }
        }
      }
      label93:
      if (i == 0) {}
      String str = this.b.a(paramObject, o.A == null ? (o.A = o.a("java.lang.Object")) : (i != 0) || (paramObject != null) ? paramObject.getClass() : o.A);
      label145:
      return new JRadioButton(str);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.h.o

 * JD-Core Version:    0.7.0.1

 */